package com.sinosoft.test;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

import com.sinosoft.perfect.system._.util.DateUtil;
import com.sinosoft.perfect.system._.util.MD5Util;

public class GenerateLicense {

	/**
	 * @param args
	 * @throws UnsupportedEncodingException 
	 */
	public static void main(String[] args) throws NoSuchAlgorithmException {
		try {
			System.out.println("password:[\n"+encoding()+"\n]");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}
	
	public static String encoding() throws NoSuchAlgorithmException, UnsupportedEncodingException{
		String encoding = 
				MD5Util.getEncryptedPwd("1-gaoyantest-13503783716734464674024-1-v0.1")
					+"&&"+
				MD5Util.getEncryptedPwd("LIMIT-1095")
					+"&&"+
				MD5Util.byteToHexString((""+(DateUtil.parseStringYYYY_MM_DDToDate("2012-10-16")).getTime()).getBytes());
		return encoding;
	}
	
	
	
	/**
	 * 呼和浩特数据交换平台序列号
	 * 
	 * 1-huhhotGovManagement-13423608240336333129698-1-v0.1
	 * LIMIT-1095
	 * 2012-07-15
	 * 
	 * B46F7DD60A6A78292890769776990423EE1641411602BDBD4B5C8E30&&1881E9A92CB63B688DD9CB4E983DF5B065F95E1C7110875E46257B8C&&31333432323831363030363436
	 * 
	 * 
	 * 
	 * 1-huhhotGovPrepose-13423622727138336294637-1-v0.1
	 * LIMIT-1095
	 * 2012-07-15
	 * 
	 * 24300B9D753907AE1FEF2DADA5829ABA2A61E5CE81DB023920DC7EB4&&A41226BECD708E34792C36245571F9077229EA455EC643A082426DD3&&31333432323831363030363535
	 * 
	 * 
	 * 
	 * 
	 * 1-huhhotGovManagement-13376034694110062695150-1-v0.1
	 * LIMIT-1095
	 * 2012-07-15
	 * 
	 * 7C5E7E6E9BCC2573AA43D1461E3E5A662B77BE3F8408CA80E0C93341&&38201BF32947A1D62C2F85B66945CF1440E00667C98490C358C5F18C&&31333337383735323030323330
	 * 
	 * 
	 */
	
	
	
	/**
	 * 山西短信平台序列号
	 * 
	 * 1-shanxiGovSMP-13376034694110062695150-1-v0.1
	 * LIMIT-1095
	 * 2012-05-25
	 * 
	 * 7C5E7E6E9BCC2573AA43D1461E3E5A662B77BE3F8408CA80E0C93341&&38201BF32947A1D62C2F85B66945CF1440E00667C98490C358C5F18C&&31333337383735323030323330
	 * 
	 * 
	 */
}
